﻿using System.Text;

namespace iMarkdown.Blocks;

public abstract class Block
{
    public string Context { get; set; } = "";
    public abstract string ToHtml();

    public string ListToHtml(List<Block> list)
    {
        var builder = new StringBuilder();
        foreach (var block in list)
        {
            builder.Append(block.ToHtml());
        }
        return builder.ToString();
    }
}